<?php
	session_start();
	if(isset($_SESSION['hora'])){
        if (($_SESSION['hora']+1200) < time()){
            session_unset();	
            session_destroy();
            ?>			
			<head>
				<script type="text/javascript">
					document.location.href = "../index.php";
				</script>
			</head>
            <body></body>
            <?php
            exit(0);
        }else if ($_SESSION['username']!=""){
            $_SESSION['hora']=time();
        }
	}
?>